package com.example.module_chat;

import android.os.Bundle;

import androidx.fragment.app.FragmentManager;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.example.module_base_core.RouteUtils.ChatModuleRoute;
import com.example.module_chat.databinding.ActivityChatBinding;
import com.harisucici.jetpackbase.base.HBaseActivity;

@Route(path = ChatModuleRoute.Chat_Activity_Main)
public class ActivityChat extends HBaseActivity<ActivityChatBinding, ChatModel> {
    private FragmentManager fragmentManager;

    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_chat;
    }

    @Override
    public int initVariableId() {
        return BR.chatmodel;
    }

    @Override
    public void initParam() {
        super.initParam();
        fragmentManager = getSupportFragmentManager();
        fragmentManager.beginTransaction().replace(R.id.chat_fragment, new ChatFragment())
                .commitAllowingStateLoss();
    }

}
